<?foreach ($this->posts as $row):?>

<?if ($row->deleted==0||$this->is_admin):?>
<div class="topic <?if ($row->deleted):?>deleted<?endif?>" id="post_<?=$row->id?>">
    <?if ($this->is_admin):?>
    <div class="control">
        <a href="?action=comment/edit/<?=$row->id?>" class="edit" title="Редактировать"><img src="/manager/media/style/MODxCarbon/images/icons/save.png" alt="Редактировать"/></a>
        <?if ($row->deleted!=0):?>
            <a href="?action=comment/restore/<?=$row->id?>" class="restore" title="Восстановить"><img src="/manager/media/style/MODxCarbon/images/icons/b092.gif" alt="Восстановить"/></a>
        <?else:?>
        <a href="?action=comment/delete/<?=$row->id?>" class="delete" title="Удалить"><img src="/manager/media/style/MODxCarbon/images/icons/delete.png" alt="Удалить"/></a>
        <?endif?>
    </div>
    <?endif?>
    <div class="user_photo">
        <img src="<?=$row->user->get_photo("small")?>" alt="<?=htmlspecialchars($row->user->fullname)?>"/>
    </div>
    <div class="message">
        <p><strong><?=$row->user->fullname?></strong><br/><?=$this->auto_convert($row->message)?></p>
        <div class="info">Создано: <?=mb_strtolower(strftime("%d %b %Y в %H:%M",$row->createdon))?><?if ($row->deleted):?>, удалено: <?=mb_strtolower(strftime("%d %b %Y в %H:%M",$row->deleted))?><?endif?></div>
    </div>
</div>
<?endif?>

<?endforeach;?>



<div id="last" class="topic">


    <?if ($this->is_user): $this->form->show_form();else:?>Только <a href="/login.html">авторизованные</a> пользователи могут оставлять сообщения<?endif;?>

</div>



